<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2024/4/10
 * Time: 12:01
 */

namespace plugin\admin\app\logic\ai;


use plugin\admin\app\logic\BaseLogic;
use plugin\admin\app\model\ai\BotGenerateImageStyleModel;
use support\Request;
use support\Response;

class BotStyleLogic extends BaseLogic
{
    protected static $instance;

    public function __construct()
    {
        $this->model = new BotGenerateImageStyleModel();
    }

    public static function getInstance()
    {
        //        if(is_object(self::$instance)){
//            return self::$instance;
//        }

        return new self();
    }

    public function select(Request $request): Response
    {
        $field = $request->input('field');
        if($field==false){
            $request->inputSet('field','created_at');
            $request->inputSet('order','desc');
        }

        $request->inputSet('isdel','0');
        return parent::select($request);
    }

    public function insert(Request $request): Response
    {
        return parent::insert($request);
    }


    public function update(Request $request): Response
    {
        return parent::update($request);
    }

    public function delete(Request $request): Response
    {
        return parent::isDelete($request);
    }
}